<template>
    <div>
        <p>绑定的值(props):{{ props.mVal }}</p>
        <button @click="editmValprops">修改props的值</button>
        <p @click="mval++">绑定的值(props):{{ mval }}</p>
    </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
const props=defineProps(['mVal'])
const emit=defineEmits(['updata:mVal'])
const editmValprops=()=>{
    emit('updata:mVal',200)
}
const mval=ref(props.mVal)
</script>